<?php
/**
 * licenses : MIT
 * creatTime: 2020/5/15
 * author : weblinuxgame
 * filename: UserApi.php
 */

namespace App\Api\Modules\User;

use Illuminate\Http\Request;
use Illuminate\Http\Response;
use OpenApi\Annotations as OA;

/**
 * @OA\Tag(
 *    name="User",
 *    description="## 前端-用户信息操作接口集合",
 *   )
 */

/**
 * Interface UserApi
 * @package App\Api\Modules\User
 */
interface UserApi
{
    /**
     * @OA\Get(
     *     path="/user/profiles",
     *     tags={"User"},
     *     summary="user profiles",
     *     description="获取用户信息",
     *     operationId="userProfiles",
     *     @OA\Parameter(
     *       name="Authentication",
     *       in="header",
     *       description="登陆令牌",
     *       @OA\Schema(
     *          type="string",
     *          format="string",
     *          default="",
     *       ),
     *     ),
     *     @OA\Parameter(
     *       name="profiles",
     *       in="query",
     *       description="要求过滤的字段或保留的字段",
     *       @OA\Schema(
     *          type="array",
     *          format="array",
     *          @OA\Items(
     *             type="string",
     *             format="string",
     *          )
     *       ),
     *     ),
     *     @OA\Parameter(
     *       name="X-Code",
     *       in="header",
     *       description="用户注册邀请码,活动码,相关追踪码,多种逗号分隔",
     *       @OA\Schema(
     *          type="string",
     *          format="string",
     *          default="xxx:xxx,xxx1:xxx",
     *       ),
     *     ),
     *     @OA\Parameter(
     *       name="X-UUID",
     *       in="header",
     *       description="用户设备码",
     *       @OA\Schema(
     *          type="string",
     *          format="string",
     *          default="",
     *       ),
     *     ),
     *     @OA\Parameter(
     *       name="X-UserAgent",
     *       in="header",
     *       description="设备http客户端user-agent",
     *       @OA\Schema(
     *          type="string",
     *          format="string",
     *          default="",
     *       ),
     *     ),
     *      @OA\Parameter(
     *       name="X-DeviceType",
     *      in="header",
     *       description="设备类型(0:浏览器,1:安卓,2:苹果,3:其他)",
     *       @OA\Schema(
     *          type="int",
     *          format="int",
     *          default=2,
     *       ),
     *     ),
     *    @OA\Parameter(
     *       name="X-AppVer",
     *       in="header",
     *       description="app version,eg:2.0.0 ",
     *       @OA\Schema(
     *          type="string",
     *          format="string",
     *          default="0.0.1",
     *       ),
     *     ),
     *     @OA\Response(
     *         response="default",
     *         description="注册结果",
     *         @OA\JsonContent(ref="#/components/schemas/"),
     *     ),
     *     security={}
     *
     * )
     */
    /**
     * 获取当前用户详细信息
     * @param Request $request
     * @return Response
     */
    public function profile(Request $request): Response;

    /**
     * 更新当前用户信息
     * @param Request $request
     * @return Response
     */
    public function update(Request $request): Response;

    /**
     * 更新用户密码
     * @param Request $request
     * @return Response
     */
    public function password(Request $request): Response;

    /**
     * 罗列用户文章
     * @param Request $request
     * @return Response
     */
    public function posts(Request $request): Response;

}
